<?php
    session_start();
    if(isset($_SESSION['admin'])){
        require_once("../model/User.php");    
        $objUser = new User();
        $autocomplete = array();
        $param = filter_input(INPUT_GET, 'term');
        $consulta = $objUser->userAutocomplete($param);
        echo json_encode($consulta);
    }else{
        header("Location: index.php");
    }
?>
